package model;


import javax.swing.JOptionPane;
/**
 * The transaction users perform.
 * @author Christian
 */
public class Transaction 
{
	/**
	 * Creates the variables needed to send and receive CC
	 */
	private int transactionID;
	private String transactionNote;
	private String transactionType;
	private double amount;
	private int fromAccount; // The account which sends the CC.
	private int toAccount; // the account which receives the CC.
	
	/**
	 * Constructor initialized variables as a parameter.
	 * @param transactionNote receives an unique auto-incremented argument.
	 * @param amount receives the desired amount.
	 * @param fromAccount receives which account performs the transaction
	 * @param toAccount receives which account receives the amount.
	 */
	public Transaction(int transactionID, int toAccount, int fromAccount, double amount, String transactionType, String transactionNote) 
	{
		super();
		this.transactionID = transactionID;
		this.transactionNote = transactionNote;
		this.transactionType = transactionType;
		this.amount = amount;
		this.fromAccount = fromAccount;
		this.toAccount = toAccount;

	}
	/**
	 * @return the transactionID
	 */
	public int getTransactionID() {
		return transactionID;
	}
	/**
	 * @param transactionID the transactionID to set
	 */
	public void setTransactionID(int transactionID) {
		this.transactionID = transactionID;
	}
	/**
	 * @return the transactionID
	 */
	public String getTransactionNote() 
	{
		return transactionNote;
	}
	
	/**
	 * @param transactionNote the transactionID to set
	 */
	public void setTransactionNote(String transactionNote) 
	{
		this.transactionNote = transactionNote;
	}
	
	/**
	 * @return the amount
	 */
	public double getAmount() 
	{
		return amount;
	}
	
	/**
	 * @param amount the amount to set
	 */
	public void setAmount(double amount) 
	{
		this.amount = amount;
	}
	
	/**
	 * @return the fromAccount
	 */
	public int getFromAccount() 
	{
		return fromAccount;
	}
	
	/**
	 * @param fromAccount the fromAccount to set
	 */
	public void setFromAccount(int fromAccount) 
	{
		this.fromAccount = fromAccount;
	}
	
	/**
	 * @return the toAccount
	 */
	public int getToAccount() 
	{
		return toAccount;
	}
	
	/**
	 * @param toAccount the toAccount to set
	 */
	public void setToAccount(int toAccount) 
	{
		this.toAccount = toAccount;
	}
	/**
	 * @return the transactionType
	 */
	public String getTransactionType() {
		return transactionType;
	}
	/**
	 * @param transactionType the transactionType to set
	 */
	public void setTransactionType(String transactionType) {
		this.transactionType = transactionType;
	}

	
} // end Transaction.java
